<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="{$smarty.const.ADMIN_CSS_PATH}style.css" rel="stylesheet" type="text/css" />
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="{$smarty.const.__MODULE__}/index/main">首页</a></li>
    <li>添加分类	</li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>基本信息</span></div>
    <form action="{$smarty.const.__SELF__}" method="post" enctype="multipart/form-data">
    <ul class="forminfo">
    <li style="display: none;"><label>分类id</label><input name="uid" value="{$info.uid}" id="uid" type="text" class="dfinput" /></li>
    <li><label>分类名称</label><input name="title" value="{$info.title}" id="title" type="text" class="dfinput"/></li>
    <li><label>父级分类:</label>  
    <select class="select3" name="parent_uid" id="parent_uid">
    <!--<option value="1" selected="selected">上架</option>-->
     <option value="0" selected="selected">无</option>
    {foreach $cats_info as $k=>$v}
    <option value="{$v.uid}" {if $v.uid==$info.parent_uid}selected="selected"{/if}>{$v.title}</option>
    {/foreach}
    </select>
    </li>
    <li><label>分类状态:</label>  
    <select class="select3" name="status" id="status">
    <option value="1" selected="selected">上架</option>
    <option value="0">下架</option>
    </select>
    </li>
    <li><label>排序</label><input name="sort" value="{$info.sort}" id="sort" type="text" class="dfinput"></li>
    <li class="showimg"><label>当前图片</label><span><img src="{$info.image}" style="width: 168px;height: 126px;"/></span></li>
    <li><label>分类图片</label><input name="image" id="image" type="file" /></li>
    <li><label>&nbsp;</label><input type="submit" class="btn" value="确认保存"/></li>
    </ul>
    </form>
    
    </div>
    
     <script type="text/javascript" src="{$smarty.const.ADMIN_JS_PATH}jquery.js"></script>
    <script type="text/javascript">
    	$('#image').change(function(){ //预览图片
		  var src=window.URL.createObjectURL(document.getElementById('image').files[0]);
		  $('.showimg img').attr('src',src);
		});
    </script>
</body>
</html>
